package com.luckku.boot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.luckku.boot.model.entity.Coupon;
import com.luckku.boot.model.entity.Seckill;
import com.luckku.boot.model.vo.CouponVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author luckku
 * @date 2021/12/15
 */

@Repository
public interface CouponMapper extends BaseMapper<Coupon> {

    /**
     * /coupon/userCoupon
     * 获取用户优惠券
     */
    List<CouponVo> getUserCoupon(@Param("userId") String userId);

    /**
     * 获取usable优惠券
     */
    List<CouponVo> getUsableCoupon(String userId, Long totalPrice);
}
